The present invention generally relates to a method for storing a data encoded signal, and more particularly, relates to a method for storing a data code that is encoded in a signal received by a trainable transmitter such that it may be subsequently regenerated for transmittal to a controlled device.
Trainable transmitters are used to learn certain characteristics of received control signals such that the trainable transmitter may subsequently generate and transmit a signal having the learned characteristics to a remotely controlled device. Remotely controlled devices, such as garage door openers, televisions, and stereo equipment, include signal-receiving circuitry that looks for specific signal characteristics in a signal received from the original transmitter that is typically purchased with the remotely controlled device. If the receiving circuitry receives a signal that does not include these characteristics, the receiving circuitry will not respond to the signal.
The characteristics that a trainable transmitter must learn to effectively mimic the original transmitter depends upon the characteristics that the remotely controlled device looks for in a received signal when determining whether or not to respond to the received signal by performing a predetermined action. For example, universal remote control transmitters of the type used to control household audio and visual equipment must be capable of detecting an infrared (IR) light beam and subsequently learning the characteristics of the data code that is modulated onto the IR light beam. Such characteristics typically include the sequence of binary logic data (0's and 1's) as well as the duration and frequency of the bit pulses representing the binary data.
Radio frequency (RF) trainable transmitters are known and used for learning the characteristics of an RF signal transmitted by a garage door remote control transmitter and for generating and transmitting an RF signal including those characteristics to a garage door opening mechanism. Examples of such RF trainable transmitters are disclosed in U.S. Pat. Nos. 5,442,340; 5,479,155; 5,583,485; 5,614,885; 5,614,891; 5,627,529; 5,661,804; 5,686,903; and 5,708,415. RF trainable transmitters of the type disclosed in these patents differ from the IR trainable transmitters used to control household electronic equipment in that the carrier frequency of the transmitted RF carrier signal may vary significantly from one system to another. Further, the receivers of the devices controlled using such RF control signals are typically finely tuned to receive an RF signal having a particular carrier frequency. Therefore, RF trainable transmitters of this type must not only learn the same characteristics of the data code as an IR trainable transmitter, but they must also learn the carrier frequency of the RF carrier signal.
Both RF and IR trainable transmitters typically include a plurality of "channels" for storing the characteristics of a plurality of signals. Each signal is typically associated with a user-actuated switch so that a user selects a particular one of the learned signals for the trainable transmitter by activating the associated switch. To enable the trainable transmitter to learn the signal characteristics of various signals of different length and duration, the amount of memory provided and allocated within the trainable transmitter for each of its channels must be of sufficient size to store the characteristics of the longest known signal of which the trainable transmitter may be expected to learn. Consequently, the greater the number of channels provided in the trainable transmitter, the greater the size of memory that is required. Further, if a manufacturer of an original remote control transmitter and corresponding receiver constructs a system to utilize data codes of lengths greater than any previously existing system, the size of memory allocated per channel must increase accordingly for the trainable transmitter to learn such data codes and thus be truly "universal."
The RF trainable transmitters described in the above-identified patents first identify the carrier frequency of a received RF signal and demodulate the signal using a reference signal having a frequency related to the carrier frequency of the received RF signal. The demodulated data signal is sampled at a relatively high sampling interval (approximately 68 .mu.sec) to produce a digitized data stream representing the data signal. This digitized data stream is stored in the random access memory (RAM) of a microprocessor until the RAM has been filled with data. The processor then analyzes the digitized data stream to detect the beginning and end points of a transmitted data code word by looking for repetitions of data patterns within the data stream that fills the RAM. The microprocessor then condenses the digitized data stream by removing any data not included in the identified data code word. Subsequently, the microprocessor stores the condensed digitized data in its non-volatile memory (NVM). When a switch associated with a particular channel is actuated, the microprocessor responds by transferring the data from its NVM to its RAM and generating an output data signal by reading the data from its RAM at the same rate at which it sampled the signal during the training mode. Provided this sampling rate is high enough, this technique is sufficient to acquire and store any received data signal without having to separately identify any pulse length or pulse frequency of the binary data included in the data signal. Thus, the microprocessor effectively operates as a digital recorder to record the signal in much the same manner that a computer stores a speech signal received through a connected microphone.
To further reduce the amount of NVM required to store a digitized data signal, a compression technique was developed by the inventor whereby, once the digitized data signal had filled the RAM of the microprocessor and had been condensed using the condensing routine described in the above patents, the condensed digitized data signal is then further processed by detecting patterns in the data signal, establishing templates for each identified pattern, and by storing a sequence identifying the sequential order in the digitized data signal in which the data in the signal corresponds to the established templates. More specifically, after the digitized data signal filling the microprocessor RAM had been condensed, the processor detects the first rising edge in the data signal (i.e., the first transition from a "0" value to a "1" logic value) and then counts the number of samples that are continuously at the "1" value. As shown in FIG. 1, each template is allocated 5 bytes. Each byte may take a hexadecimal value of "0" to "FF" for counts at a logic "1" or a value of "0" to "7F" for counts at a logic "0." The value stored in each byte represents the number of continuous samples at a particular binary logic value. Thus, as shown in the first two bytes of the first template, in the exemplary data code shown in FIG. 2, there are "FF"+4 (i.e., 300) samples at the binary value "1" for the first pulse of data. Because the value stored in the second byte is less than "FF," it may be determined that a sample at a "0" logic value was detected after "FF"+4 samples at a logic "1" value. Hence, the next byte in the first template is used to store the number of samples at the "0" logic value. If there are more than "7F" samples at the "0" value, the third byte of the first template is filled with "7F" and the count is continued and filled into the next byte and possibly even the next byte. If a logic "1" is detected in the digitized data signal before the last byte of the template has been filled (i.e., such that the value in the fourth byte of the first template is less than "7F"), the last byte is filled with "00" and the number of samples at the logic "1" value are recorded in the next template.
Up to fifteen templates of this type may be stored in memory and each is assigned an ID value in sequence of "0" to "F," such that each template has its own unique identifier. Clearly, the first template will correspond to the first portion of the data signal and thus a value of "0" is stored in a template sequence portion 10 of the memory for the channel. As the microprocessor counts the number of samples at any given logic value, it compares the number of counted values to the number of counted values for templates that have already been defined. If a portion of the data being analyzed already corresponds to a defined template, the microprocessor does not create a new template, but rather simply stores the identifier of the corresponding previously-defined template in the template sequence portion 10 of the allocated memory. The microprocessor thus continues analyzing each portion of the condensed digitized data signal until the entire portion of the digitized signal has been encoded in this manner.
Subsequently, upon receiving an instruction to transmit the stored encoded data signal, the microprocessor sequentially reads the sequence of template identifiers stored in the template sequence portion 10 of the memory. The microprocessor subsequently uses these identifiers to access the identified templates in the order in which the microprocessor had stored the template identifiers during the training mode. Thus, for example, in the example illustrated in FIG. 1, the microprocessor would read the first byte of the first template and generate a digital logic "1" value for a count of 256 (FF) clock pulses generated at the same sampling rate at which the signal was digitized and then subsequently read the second byte of data in the first template and determine that it must generate four more counts at logic "1" at that sampling rate. Then, having detected that the value read from one of the bytes is less than "FF," the microprocessor begins to generate a logic "0" value for the number of counts identified in the remaining bytes of the template.
Although the above-noted data signal encoding technique works satisfactorily for essentially all garage door opening mechanisms sold in the United States, certain garage door opening systems used in Europe transmit and receive data codes of lengths that are too long to store in the NVM of the microprocessor even while using the above data storage technique. Even more problematic is that these data codes are also too long to store in the microprocessor's RAM. When the data code word is too long to fit within the microprocessor's RAM, the microprocessor cannot learn and store an entire code word, and hence cannot subsequently transmit the proper data code to which the remotely controlled device would respond. Therefore, there exists a need for not only a more efficient data compression encoding algorithm, but also a compression algorithm that can be performed in real time as the received data signal is digitized and stored in a microprocessor's RAM so that an entire data code word can be effectively stored in the microprocessor's RAM and in its NVM for subsequent transmittal.